/*
 * jdbc-trace-wrapper
 * Copyright (C) 2010. The jdbc-trace-wrapper Project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package nz.jdbcwrapper;

import oracle.jdbc.OraclePreparedStatement;
import oracle.jdbc.OracleParameterMetaData;
import oracle.jdbc.OracleResultSetCache;
import oracle.sql.ARRAY;
import oracle.sql.BFILE;
import oracle.sql.BINARY_DOUBLE;
import oracle.sql.BINARY_FLOAT;
import oracle.sql.BLOB;
import oracle.sql.CHAR;
import oracle.sql.CLOB;
import oracle.sql.CustomDatum;
import oracle.sql.INTERVALDS;
import oracle.sql.ORAData;
import oracle.sql.DATE;
import oracle.sql.NUMBER;
import oracle.sql.OPAQUE;
import oracle.sql.Datum;
import oracle.sql.StructDescriptor;
import oracle.sql.RAW;
import oracle.sql.REF;
import oracle.sql.ROWID;
import oracle.sql.STRUCT;
import oracle.sql.TIMESTAMP;
import oracle.sql.TIMESTAMPTZ;
import oracle.sql.TIMESTAMPLTZ;
import oracle.sql.INTERVALYM;

import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.Ref;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.sql.Time;
import java.sql.Timestamp;


class WrapperOraclePreparedStatement extends WrapperPreparedStatement
  implements OraclePreparedStatement
{
  final OraclePreparedStatement oraclePreparedStatement;

  public WrapperOraclePreparedStatement(Data data,
                              Statistic statistic,
                              OraclePreparedStatement oraclePreparedStatement)
  {
    super(data, statistic, oraclePreparedStatement);
    this.oraclePreparedStatement = oraclePreparedStatement;  // Same object as parent class holds
  }

    public boolean isNCHAR(int i) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " isNCHAR(...)");

    try
    {
      start = System.currentTimeMillis();
      boolean result = oraclePreparedStatement.isNCHAR(i);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void closeWithKey(String s) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " closeWithKey(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.closeWithKey(s);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnType(int i, int i1) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineColumnType(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineColumnType(i, i1);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnType(int i, int i1, String s) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineColumnType(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineColumnType(i, i1, s);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnType(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineColumnType(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineColumnType(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnTypeBytes(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineColumnTypeBytes(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineColumnTypeBytes(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnTypeChars(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineColumnTypeChars(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineColumnTypeChars(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineParameterType(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineParameterType(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineParameterType(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineParameterTypeBytes(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineParameterTypeBytes(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineParameterTypeBytes(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineParameterTypeChars(int i, int i1, int i2) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " defineParameterTypeChars(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.defineParameterTypeChars(i, i1, i2);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setARRAY(int i, ARRAY array) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setARRAY(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setARRAY(i, array);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setBFILE(int i, BFILE bfile) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setBFILE(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setBFILE(i, bfile);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setBLOB(int i, BLOB blob) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setBLOB(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setBLOB(i, blob);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setBfile(int i, BFILE bfile) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setBfile(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setBfile(i, bfile);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setCHAR(int i, CHAR aChar) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setCHAR(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setCHAR(i, aChar);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setCLOB(int i, CLOB clob) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setCLOB(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setCLOB(i, clob);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setCheckBindTypes(boolean b) {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setCheckBindTypes(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setCheckBindTypes(b);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setCursor(int i, ResultSet resultSet) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setCursor(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setCursor(i, resultSet);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setCustomDatum(int i, CustomDatum customDatum) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setCustomDatum(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setCustomDatum(i, customDatum);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setDATE(int i, DATE date) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setDATE(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setDATE(i, date);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setDisableStmtCaching(boolean b) {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setDisableStmtCaching(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setDisableStmtCaching(b);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setExecuteBatch(int i) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setExecuteBatch(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setExecuteBatch(i);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setFixedCHAR(int i, String s) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setFixedCHAR(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setFixedCHAR(i, s);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setFormOfUse(int i, short i1) {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setFormOfUse(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setFormOfUse(i, i1);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setINTERVALYM(int i, INTERVALYM intervalym) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setINTERVALYM(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setINTERVALYM(i, intervalym);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setNUMBER(int i, NUMBER number) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setNUMBER(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setNUMBER(i, number);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setOPAQUE(int i, OPAQUE opaque) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setOPAQUE(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setOPAQUE(i, opaque);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setORAData(int i, ORAData oraData) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setORAData(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setORAData(i, oraData);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setOracleObject(int i, Datum datum) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setOracleObject(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setOracleObject(i, datum);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setPlsqlIndexTable(int i, Object o, int i1, int i2, int i3, int i4) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setPlsqlIndexTable(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setPlsqlIndexTable(i, o, i1, i2, i3, i4);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setRAW(int i, RAW raw) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setRAW(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setRAW(i, raw);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setREF(int i, REF ref) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setREF(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setREF(i, ref);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setROWID(int i, ROWID rowid) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setROWID(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setROWID(i, rowid);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setRefType(int i, REF ref) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setRefType(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setRefType(i, ref);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setResultSetCache(OracleResultSetCache oracleResultSetCache) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setResultSetCache(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setResultSetCache(oracleResultSetCache);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setRowPrefetch(int i) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setRowPrefetch(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setRowPrefetch(i);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setSTRUCT(int i, STRUCT struct) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setSTRUCT(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setSTRUCT(i, struct);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setStructDescriptor(int i, StructDescriptor structDescriptor) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setStructDescriptor(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setStructDescriptor(i, structDescriptor);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setTIMESTAMP(int i, TIMESTAMP timestamp) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setTIMESTAMP(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setTIMESTAMP(i, timestamp);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setTIMESTAMPLTZ(int i, TIMESTAMPLTZ timestampltz) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setTIMESTAMPLTZ(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setTIMESTAMPLTZ(i, timestampltz);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void setTIMESTAMPTZ(int i, TIMESTAMPTZ timestamptz) throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " setTIMESTAMPTZ(...)");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.setTIMESTAMPTZ(i, timestamptz);
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public OracleParameterMetaData OracleGetParameterMetaData() throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " OracleGetParameterMetaData()");

    try
    {
      start = System.currentTimeMillis();
      OracleParameterMetaData result = oraclePreparedStatement.OracleGetParameterMetaData();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public int creationState() {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " creationState()");

    try
    {
      start = System.currentTimeMillis();
      int result = oraclePreparedStatement.creationState();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public int getExecuteBatch() {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " getExecuteBatch()");

    try
    {
      start = System.currentTimeMillis();
      int result = oraclePreparedStatement.getExecuteBatch();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public int getRowPrefetch() {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " getRowPrefetch(...)");

    try
    {
      start = System.currentTimeMillis();
      int result = oraclePreparedStatement.getRowPrefetch();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public int sendBatch() throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " sendBatch()");

    try
    {
      start = System.currentTimeMillis();
      int result = oraclePreparedStatement.sendBatch();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, String.valueOf(result));

      return result;
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void clearDefines() throws SQLException {
    long start = 0;
    long duration = Long.MIN_VALUE;
    long key = 0L;

    if (data.trace >= 3)
      key = Util.traceBegin(prefix + " clearDefines()");

    try
    {
      start = System.currentTimeMillis();
      oraclePreparedStatement.clearDefines();
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, (String)null);
    }
    catch (SQLException e)
    {
      duration = System.currentTimeMillis() - start;

      if (data.trace >= 3)
        Util.traceEnd(key, e);

      throw e;
    }
    finally
    {
      if (duration == Long.MIN_VALUE)
        duration = System.currentTimeMillis() - start;

      if (statistic != null)
        statistic.execution(duration);
      checkWarnings();
    }
  }

    public void defineColumnType(int arg0, int arg1, int arg2, short arg3) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " defineColumnType(int, int, int, short)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.defineColumnType(arg0, arg1, arg2, arg3);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setARRAYAtName(String arg0, ARRAY arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setARRAYAtName(String, ARRAY)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setARRAYAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setArrayAtName(String arg0, Array arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setArrayAtName(String, Array)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setArrayAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setAsciiStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setAsciiStreamAtName(String, InputStream, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setAsciiStreamAtName(arg0, arg1, arg2);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBFILEAtName(String arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBFILEAtName(String, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBFILEAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBLOBAtName(String arg0, BLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBLOBAtName(String, BLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBLOBAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBfileAtName(String arg0, BFILE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBfileAtName(String, BFILE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBfileAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBigDecimalAtName(String arg0, BigDecimal arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBigDecimalAtName(String, BigDecimal)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBigDecimalAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryDouble(int arg0, BINARY_DOUBLE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryDouble(int, BINARY_DOUBLE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryDouble(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryDouble(int arg0, double arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryDouble(int, double)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryDouble(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryDoubleAtName(String arg0, BINARY_DOUBLE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryDoubleAtName(String, BINARY_DOUBLE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryDoubleAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryDoubleAtName(String arg0, double arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryDoubleAtName(String, double)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryDoubleAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryFloat(int arg0, BINARY_FLOAT arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryFloat(int, BINARY_FLOAT)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryFloat(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryFloat(int arg0, float arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryFloat(int, float)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryFloat(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryFloatAtName(String arg0, BINARY_FLOAT arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryFloatAtName(String, BINARY_FLOAT)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryFloatAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryFloatAtName(String arg0, float arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryFloatAtName(String, float)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryFloatAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBinaryStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBinaryStreamAtName(String, InputStream, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBinaryStreamAtName(arg0, arg1, arg2);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBlobAtName(String arg0, Blob arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBlobAtName(String, Blob)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBlobAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBooleanAtName(String arg0, boolean arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBooleanAtName(String, boolean)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBooleanAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setByteAtName(String arg0, byte arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setByteAtName(String, byte)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setByteAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setBytesAtName(String arg0, byte[] arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setBytesAtName(String, byte[])");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setBytesAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setCHARAtName(String arg0, CHAR arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setCHARAtName(String, CHAR)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setCHARAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setCLOBAtName(String arg0, CLOB arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setCLOBAtName(String, CLOB)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setCLOBAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setClobAtName(String arg0, Clob arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setClobAtName(String, Clob)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setClobAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setCursorAtName(String arg0, ResultSet arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setCursorAtName(String, ResultSet)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setCursorAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setCustomDatumAtName(String arg0, CustomDatum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setCustomDatumAtName(String, CustomDatum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setCustomDatumAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setDATEAtName(String arg0, DATE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setDATEAtName(String, DATE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setDATEAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setDateAtName(String arg0, Date arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setDateAtName(String, Date)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setDateAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setDoubleAtName(String arg0, double arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setDoubleAtName(String, double)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setDoubleAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setFixedCHARAtName(String arg0, String arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setFixedCHARAtName(String, String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setFixedCHARAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setFloatAtName(String arg0, float arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setFloatAtName(String, float)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setFloatAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setINTERVALDS(int arg0, INTERVALDS arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setINTERVALDS(int, INTERVALDS)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setINTERVALDS(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setINTERVALDSAtName(String arg0, INTERVALDS arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setINTERVALDSAtName(String, INTERVALDS)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setINTERVALDSAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setINTERVALYMAtName(String arg0, INTERVALYM arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setINTERVALYMAtName(String, INTERVALYM)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setINTERVALYMAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setIntAtName(String arg0, int arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setIntAtName(String, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setIntAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setLongAtName(String arg0, long arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setLongAtName(String, long)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setLongAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setNUMBERAtName(String arg0, NUMBER arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setNUMBERAtName(String, NUMBER)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setNUMBERAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setNullAtName(String arg0, int arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setNullAtName(String, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setNullAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setNullAtName(String arg0, int arg1, String arg2) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setNullAtName(String, int, String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setNullAtName(arg0, arg1, arg2);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setOPAQUEAtName(String arg0, OPAQUE arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setOPAQUEAtName(String, OPAQUE)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setOPAQUEAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setORADataAtName(String arg0, ORAData arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setORADataAtName(String, ORAData)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setORADataAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setObjectAtName(String arg0, Object arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setObjectAtName(String, Object)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setObjectAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setObjectAtName(String arg0, Object arg1, int arg2) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setObjectAtName(String, Object, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setObjectAtName(arg0, arg1, arg2);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setObjectAtName(String arg0, Object arg1, int arg2, int arg3) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setObjectAtName(String, Object, int, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setObjectAtName(arg0, arg1, arg2, arg3);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setOracleObjectAtName(String arg0, Datum arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setOracleObjectAtName(String, Datum)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setOracleObjectAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setRAWAtName(String arg0, RAW arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setRAWAtName(String, RAW)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setRAWAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setREFAtName(String arg0, REF arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setREFAtName(String, REF)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setREFAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setROWIDAtName(String arg0, ROWID arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setROWIDAtName(String, ROWID)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setROWIDAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setRefAtName(String arg0, Ref arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setRefAtName(String, Ref)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setRefAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setRefTypeAtName(String arg0, REF arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setRefTypeAtName(String, REF)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setRefTypeAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setSTRUCTAtName(String arg0, STRUCT arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setSTRUCTAtName(String, STRUCT)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setSTRUCTAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setShortAtName(String arg0, short arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setShortAtName(String, short)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setShortAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setStringAtName(String arg0, String arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setStringAtName(String, String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setStringAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setStringForClob(int arg0, String arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setStringForClob(int, String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setStringForClob(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setStringForClobAtName(String arg0, String arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setStringForClobAtName(String, String)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setStringForClobAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setStructDescriptorAtName(String arg0, StructDescriptor arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setStructDescriptorAtName(String, StructDescriptor)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setStructDescriptorAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setTIMESTAMPAtName(String arg0, TIMESTAMP arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setTIMESTAMPAtName(String, TIMESTAMP)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setTIMESTAMPAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setTIMESTAMPLTZAtName(String arg0, TIMESTAMPLTZ arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setTIMESTAMPLTZAtName(String, TIMESTAMPLTZ)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setTIMESTAMPLTZAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setTIMESTAMPTZAtName(String arg0, TIMESTAMPTZ arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setTIMESTAMPTZAtName(String, TIMESTAMPTZ)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setTIMESTAMPTZAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setTimeAtName(String arg0, Time arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setTimeAtName(String, Time)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setTimeAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setTimestampAtName(String arg0, Timestamp arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setTimestampAtName(String, Timestamp)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setTimestampAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setURLAtName(String arg0, URL arg1) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setURLAtName(String, URL)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setURLAtName(arg0, arg1);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

    public void setUnicodeStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException
    {
        long key = 0L;
        if (data.trace >= 4)
            key = Util.traceBegin(prefix + " setUnicodeStreamAtName(String, InputStream, int)");

        long duration = Long.MIN_VALUE;
        long start = 0L;

        try
        {
            start = System.currentTimeMillis();
            oraclePreparedStatement.setUnicodeStreamAtName(arg0, arg1, arg2);
            duration = System.currentTimeMillis() - start;

            if (data.trace >= 4)
                Util.traceEnd(key, (String)null);
            return;
        }
        catch (SQLException e)
        {
            if (data.trace >= 4)
                Util.traceEnd(key, e);
            throw e;
        }
        finally
        {
            if (duration == Long.MIN_VALUE) {
                duration = System.currentTimeMillis() - start;
            }
            statistic.column(duration);
            checkWarnings();
        }
    }

}
